
<?php $this->load->view("block/templates"); ?>

<script src="/assets/js/libs/jquery/jquery-1.7.1.min.js"></script>
<script src="/assets/js/libs/underscore/underscore-min.js"></script>
<script src="/assets/js/libs/backbone/backbone-min.js"></script>
<script src="/assets/js/libs/swfobject/swfobject.js"></script>
<script src="/assets/js/libs/bootstrap/v.2.0/bootstrap.min.js"></script>
<script src="/assets/js/Ilts.js"></script>


<div id="fb-root"></div>
<script>
    
     window.fbAsyncInit = function() {
        FB.init({
          appId:        '<?php echo $this->config->item("ilts_fb_app_id") ?>',
          status:        <?php echo $this->config->item("ilts_fb_status") ?>,
          cookie:        <?php echo $this->config->item("ilts_fb_cookie") ?>,
          channelUrl  : '<?php echo $this->config->item("ilts_fb_channel_url") ?>', 
          xfbml:         <?php echo $this->config->item("ilts_fb_xfbml") ?>
        }); 

        FB.Event.subscribe('auth.login', function(response) {
          // do something with response
          FacebookConnect.login();
        });
        FB.Event.subscribe('auth.logout', function(response) {
          // do something with response
          //FacebookUser.logout();
        });
        FB.getLoginStatus(function(response) {
          if (response.authResponse) {
            // logged in and connected user, someone you know
            FacebookUser.addUserBox();
          } else {
            // no user session available, someone you dont know
            FacebookConnect.addConnectBar();
          }
        });

     };


     // Load the SDK Asynchronously
     (function(d){
       var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
       js = d.createElement('script'); js.id = id; js.async = true;
       js.src = "//connect.facebook.net/en_US/all.js";
       d.getElementsByTagName('head')[0].appendChild(js);
     }(document));

   
</script>
<?php
$account_ga = $this->config->item("ilts_google_analytics");
if ($account_ga != ""):
?>
<script>
  window._gaq = [['_setAccount','<?php echo $account_ga ?>'],['_trackPageview'],['_trackPageLoadTime']];
  Modernizr.load({
    load: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'
  });
</script>
<?php
endif;
?>
<!-- Prompt IE 6 users to install Chrome Frame. Remove this if you want to support IE 6.
     chromium.org/developers/how-tos/chrome-frame-getting-started -->
<!--[if lt IE 7 ]>
  <script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
  <script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
<![endif]-->
